﻿using Com.JunCaiSoft.DBContext;
using Com.JunCaiSoft.SystemConfig.Dao;
using Com.JunCaiSoft.SystemConfig.IDao;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.SystemConfig
{
    public static class SystemConfigServiceCollectionExtension
    {
        public static IServiceCollection AddSystemConfig(this IServiceCollection services)
        {

            //添加秘钥管理相关注入
            services.TryAddSingleton<IAppSecretManageDao>(new AppSecretManageDao(services.BuildServiceProvider().GetService<MSSQLDbContext>()));

            return services;
        }
    }
}
